<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>演员列表页面</title>
    <link href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
<div class="container">
    <div class="text" style="margin-top: 20px;margin-left: 40%"><h1>演员列表页面</h1></div>
    <div class="text" style="..."><a >学号：1604220535</a><br>姓名：杨友奇</br></div>

    <div class="row" style="margin-top: 10px">
        <div class="col-2">
            <div class="list-group">
                <a class="list-group-item list-group-item-action active" th:href="@{/movie/index}">电影管理</a>
                <a class="list-group-item list-group-item-action" th:href="@{/actor/index}" >演员管理</a>
            </div>
        </div>

        <div class="col">
            <a class="btn btn-primary" th:href="@{/actor/add}">新增演员</a>
            <table class="table table-striped">
                <thead>
                <tr>
                    <th scope="col">#</th>
                    <th scope="col">演员名称</th>
                    <th scope="col">性别</th>
                    <th scope="col">生日</th>
                    <th scope="col">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="actor,acotrStat : ${info}">
                    <td th:text="${acotrStat.index + 1}"></td>
                    <td th:text="${actor.name}"></td>
                    <td th:text="${actor.sex}"></td>
                    <td th:text="${actor.born} ? ${#dates.format(actor.born,'yyyy-MM-dd')} :''"></td>
                    <td>
                        <a th:href="@{/actor/detail/{actorId}(actorId=${actor.id})}">详情</a>
                        <a th:href="@{/actor/edit/{actorId}(actorId=${actor.id})}">编辑</a>.
                        <a th:href="@{/actor/delete/{actorId}(actorId=${actor.id})}">删除</a>

                    </td>
                </tr>
                </tbody>

            </table>
        </div>
    </div>
</div>

</body>
</html>